<?php

namespace app\admin\controller;

/**
* 
*/
class Content extends Base
{
 	//评论列表
 	public function list_l(){
 		$content=model('Content')->with('article,member')->order('id','desc')->paginate(10);
 		$viewData=[
 			'content'=>$content
 		];
 		$this->assign($viewData);
 		return view();
 	}
 	//删除评论
 	public function del(){
 		if(request()->isAjax()){
 			$contentInfo=model('Content')->find(input('post.id'));
 			$result=$contentInfo->delete();
 			if($result){
 				$this->success('删除成功！','admin/content/list_l');
 			}else{
 				$this->error($result);
 			}
 		}
 	}

}






